/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	win7 
 * 
 * <p>描   述  :   MaintenTechnology.java for com.pengtu.gsj.entity.jsbz    </p>
 * 
 * <p>最后修改 : $: 2017年8月10日-下午5:22:27 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jsbz;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * MaintenTechnology
 * 
 * 2017年8月10日 下午5:22:27
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JS_MAINTENTECHNOLOGY")
public class MaintenTechnology extends IdEntity {

	private static final long serialVersionUID = -2340258435265597888L;
	
	private String winningName;					//获奖名称
	private String winningTime;					//获奖时间
	private String winningGrade;				//获奖级别
	private String winningType;					//获奖类型
	private String winningDepartment;			//颁奖部门
	private String remark;						//备注
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	@Column(name = "WINNINGNAME")
	public String getWinningName() {
		return winningName;
	}
	public void setWinningName(String winningName) {
		this.winningName = winningName;
	}
	@Column(name = "WINNINGTIME")
	public String getWinningTime() {
		return winningTime;
	}
	public void setWinningTime(String winningTime) {
		this.winningTime = winningTime;
	}
	@Column(name = "WINNINGGRADE")
	public String getWinningGrade() {
		return winningGrade;
	}
	public void setWinningGrade(String winningGrade) {
		this.winningGrade = winningGrade;
	}
	@Column(name = "WINNINGTYPE")
	public String getWinningType() {
		return winningType;
	}
	public void setWinningType(String winningType) {
		this.winningType = winningType;
	}
	@Column(name = "WINNINGDEPARTMENT")
	public String getWinningDepartment() {
		return winningDepartment;
	}
	public void setWinningDepartment(String winningDepartment) {
		this.winningDepartment = winningDepartment;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
